package com.java.netty.dubborpc.provider;

import com.java.netty.dubborpc.publicinterface.HelloService;
import io.netty.util.internal.StringUtil;

/**
 * @author jl
 * Created on 2020/10/3
 */
public class HelloServiceImpl implements HelloService {
    // 当有消费者调用该方法时,就返回一个结果
    @Override
    public String hello(String msg) {
        System.out.println("收到客户端消息:" + msg);

        if (StringUtil.isNullOrEmpty(msg)) {
            return "你好客户端,我已经收到你的消息";
        } else {
            return "你好客户端,我已经收到你的消息" + msg;
        }
    }
}
